#ifndef _TUYA_OS_ADAPT_BT_H_
#define _TUYA_OS_ADAPT_BT_H_

#include <stdio.h>
#include <unistd.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include "uni_md5.h"
#include "tuya_bt.h"
#include "tuya_hal_bt.h"
#include "uni_log.h"
#include "mem_pool.h"
#include "tuya_os_adapter.h"
#include "tuya_os_adapter_error_code.h"
#include "InCommon.h"
#include "InPerUartHandle.h"

#define BT_MAC_ADDR_PARAM           "bt_mac_addr_param"

OPERATE_RET tuya_os_adapt_bt_port_init(ty_bt_param_t *p);
OPERATE_RET tuya_os_adapt_bt_port_deinit(void);
OPERATE_RET tuya_os_adapt_bt_gap_disconnect(void);
OPERATE_RET tuya_os_adapt_bt_send(BYTE_T *data, UINT8_T len);
OPERATE_RET tuya_os_adapt_bt_reset_adv(tuya_ble_data_buf_t *adv, tuya_ble_data_buf_t *scan_resp);
OPERATE_RET tuya_os_adapt_bt_get_rssi(SCHAR_T *rssi);
OPERATE_RET tuya_os_adapt_bt_start_adv();
OPERATE_RET tuya_os_adapt_bt_stop_adv();
OPERATE_RET tuya_os_adapt_bt_start_scan();
OPERATE_RET tuya_os_adapt_bt_stop_scan();
OPERATE_RET tuya_os_adapt_bt_scan_init(IN TY_BT_SCAN_ADV_CB scan_adv_cb);
OPERATE_RET tuya_os_adapt_bt_assign_scan(IN OUT ty_bt_scan_info_t *info);
OPERATE_RET tuya_os_adapt_bt_get_ability(VOID_T);
OPERATE_RET tuya_os_adapt_reg_bt_intf(void);
OPERATE_RET tuya_ext_bt_setmac(CONST NW_MAC_S *mac);
OPERATE_RET tuya_ext_bt_getmac(NW_MAC_S *mac);

OPERATE_RET tuya_adapter_wifi_get_ip(IN CONST WF_IF_E wf,OUT NW_IP_S *ip);

#endif /* end of _TUYA_OS_ADAPT_BT_H_ */
